package xyz.xtt.user.service;

import java.util.Collection;
import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;

import xyz.xtt.user.client.request.UserRegRequest;
import xyz.xtt.user.client.response.UserRegResponse;
import xyz.xtt.user.entity.TblUser;
import xyz.xtt.user.vo.user.UserVo;

/**
 * <p>
 * 用户基础信息表 服务类
 * </p>
 *
 * @author author
 * @since 2024-10-17
 */
public interface ITblUserService extends IService<TblUser> {
	/**
	 * 查询用户信息
	 * 
	 * @param uid
	 * @return
	 */
	TblUser info(Long uid);

	/**
	 * @param uid
	 * @return
	 */
	Long syncInfo(Long uid);

	/**
	 * 批量查询用户信息
	 * 
	 * @param uids
	 * @return
	 */
	List<TblUser> userInfo(Collection<String> uids);

	/**
	 * 更新用户信息
	 * 
	 * @param user
	 * @return
	 */
	boolean updateUser(TblUser user);

	/**
	 * 自动注册更新用户信息
	 * 
	 * @param user
	 * @return
	 */
	boolean autoRegUpdateUser(TblUser user);

	/**
	 * 用户注销更新状态
	 * 
	 * @param appUid
	 * @return
	 */
	boolean updateUserStatusLogoff(Long appUid);

	/**
	 * 根据手机查用户
	 * 
	 * @param phone
	 * @return
	 */
	TblUser infoWithPhone(String phone);

	/**
	 * 更新用户
	 * 
	 * @param appUserId
	 * @param userName
	 * @param idCardNo
	 */
	void updateAuthByAppUserId(String appUserId, String userName, String idCardNo);

	/**
	 * @param appUserId
	 */
	void updateAuthStatusByAppUserId(String appUserId);

	Boolean setUserGuide(Long uid);

	UserVo getUserInfo(String uid);

	UserRegResponse register(UserRegRequest userRegRequest);

	TblUser infoWithUserId(Long userId);

	/**
	 * 是否需要实名验证
	 * 
	 * @param uid
	 * @param authCheckFrequency
	 * @return
	 */
	boolean checkAuth(String uid, Long authCheckFrequency);

}
